tests: Add a uint8 test
authorBenjamin Otte <otte@redhat.com>
Mon, 9 Apr 2012 00:54:17 +0000 (02:54 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 9 Apr 2012 01:09:44 +0000 (03:09 +0200)
... to ensure the last test works.

tests/css/parser/test-css-parser.c

index feea8a567e01175a18535b61508de199acf648ec..ebe2b2bb5aa4faf7459c6a57e22fde3bc424e75a 100644 (file)
@@ -287,6 +287,15 @@ add_tests_for_files_in_directory (GFile *dir)
   g_list_free_full (files, g_object_unref);
 }
 
+static gboolean
+parse_uint8 (const char *string,
+             GValue *value,
+             GError **error)
+{
+  g_value_set_uchar (value, 42);
+  return TRUE;
+}
+
 int
 main (int argc, char **argv)
 {
@@ -382,6 +391,12 @@ main (int argc, char **argv)
                                                               GTK_TYPE_STATE_FLAGS,
                                                               GTK_STATE_FLAG_NORMAL,
                                                               G_PARAM_READABLE));
+  gtk_style_properties_register_property (parse_uint8,
+                                          g_param_spec_uchar ("uint8-property",
+                                                              "uint8 property",
+                                                              "test uint8 properties",
+                                                              0, G_MAXUINT8, 0,
+                                                              G_PARAM_READABLE));
 
   if (argc < 2)
     {